package net.optix.ip.vo
{
	public class ClientVO
	{
		// attributes ============================

		public var firstName:String;
		public var lastName:String;
		public var message:String;
		
		public var business:String;
		public var email:String;
		
		public var clientID:int;
		public var userID:int;
		
		// add at 2009-3-30
		public var bService:int;
		
		public var bAuction:int;
		public var billingAddress:String;
		public var billingCity:String;
		public var billingState:String;
		public var billingCountry:String;
		public var billingPostalCode:String;
		public var taxID:String;
		public var description:String;
		
		public var address:String;
		public var city:String;
		public var state:String;
		public var country:String;
		public var postalCode:String;
		public var language:String;
		public var workPhone:String;
		public var homePhone:String;
		public var cellPhone:String;
		
		public var bFileOut:Boolean	=	true;
		
		public static function purseClient(value:XML):ClientVO
		{
			var client:ClientVO		=	new ClientVO();
			try
			{
				client.bService		=	value.BService;
				
				client.clientID		=	value.ClientID;
				client.userID		=	value.UserID;
				client.description	=	value.Description;
				client.bAuction		=	value.BAuction;
				client.billingAddress	=	value.BillingAddress;
				client.billingCity		=	value.BillingCity;
				client.billingState		=	value.BillingState;
				client.billingCountry	=	value.BillingCountry;
				client.billingPostalCode=	value.BillingPostalCode;
				client.taxID			=	value.TaxID;
				client.business			=	value.Business;
				
				client.firstName		=	value.FirstName;
				client.lastName			=	value.LastName;
				client.email			=	value.Email;
				client.address			=	value.Address;
				client.city				=	value.City;
				client.state			=	value.State;
				client.country			=	value.Country;
				client.postalCode		=	value.PostalCode;
				
				if(client.business == '' 
					|| client.billingAddress == '' 
					|| client.billingCity == ''
					|| client.billingState == ''
					|| client.billingCountry == ''
					|| client.billingPostalCode == ''
					|| client.taxID == '')
					{
						client.bFileOut	=	false;
					}
					
				trace(client.bFileOut+"  file out");
			}
			catch(error:Error){}
			return client;
		}
		

	}
}